<h1>{{ resource_allowed_project_title }}</h1>

<section class="tlp-pane">
    <div class="tlp-pane-container">
        <div class="tlp-pane-header">
            <h1 class="tlp-pane-title">
                <i class="fa fa-archive tlp-pane-title-icon"></i> {{ resource_allowed_project_pane_title }}
            </h1>
        </div>

        <section class="tlp-pane-section">
            <p>{{ resource_allowed_project_information }}</p>

            {{# allow_all_enabled }}
                <form id="allowed-projects-all-form" action="{{ restricted_resource_action }}" method="POST">
                    {{{ restricted_resource_action_csrf }}}

                    <div class="tlp-form-element">
                        <label class="tlp-label" for="allowed-projects-all-allowed">{{ resource_allowed_project_allow_all }}</label>
                        <div class="tlp-switch">
                            <input type="checkbox"
                                id="allowed-projects-all-allowed"
                                data-form-id="allowed-projects-all-form"
                                class="tlp-switch-checkbox"
                                name="all-allowed"
                                value="1"
                                {{^ is_resource_restricted }}checked{{/ is_resource_restricted }}
                            >
                            <label for="allowed-projects-all-allowed" class="tlp-switch-button" aria-hidden>{{ resource_allowed_project_allow_all }}</label>
                        </div>
                    </div>
                </form>
            {{/ allow_all_enabled }}

            {{# is_resource_restricted }}
                {{> allowed-projects-list }}
            {{/ is_resource_restricted }}
        </section>
    </div>
</section>
